import React, { Component } from 'react'
import './index.css'

export default class B extends Component {
	render() {
		return (
			<div className="b">
				<h2>我是B组件</h2>
				<button onClick={this.changeCar}>给车改名</button>
			</div>
		)
	}

	changeCar = ()=>{
		this.props.x('奥拓')
	}
}
